package cn.edu.scau.cmi.ema.service;

import java.util.List;
import java.util.Set;
import java.io.IOException;
import com.alibaba.fastjson.JSONObject;
import java.util.Map;
import org.springframework.web.bind.annotation.RequestParam;
import cn.edu.scau.cmi.ema.domain.*;
import cn.edu.scau.cmi.ema.domain.base.CmiPagination;


public interface UnitService {

	public Unit saveUnit(Unit unit);

	public Set<Unit> loadUnits();

	public Set<Unit> loadReferenceUnits(Set<Unit> units);

	public Set<Unit> loadUnitsByIdSet(Set<Integer> unitsId);

	public Map<String, ?> loadUnitObjectReferencedSet(Unit unit);

	public Map<String, ?> loadUnitClassReferencedSet(Unit unit);

	public void deleteUnit(Unit unit);

	public void deleteUnits(Set<Integer> deleteUnitsId);

	public List<Unit> findAllUnits(Integer startResult, Integer maxRows);

	public Unit findUnitByPrimaryKey(Integer id);

	public Integer countUnits();

	public Integer countUnits(CmiPagination page);

	public Integer countUnitsByName(String queryName);

	public Integer countUnitsByDetachedCriteria(CmiPagination page);

}
